﻿namespace Maple.Branch.Users.Extensions
{
    using IEntities;

    public static class UserExtensions
    {
        public static IUserData ToUserData(this IUser user)
        {
            return new UserData(
                id: user.Id,
                userName: user.UserName,
                email: user.Email,
                name: user.Name,
                emailConfirmed: user.EmailConfirmed,
                tenantId: user.TenantId
            );
        }
    }
}
